package com.atguigu.gulimall.product;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * JSR303校验
 * 1）、给bean添加校验注解：javax.validation.constraints，并定义自己的message提示
 * 2)、开启校验功能 @Valid
 *    效果：校验错误以后会有默认的响应
 * 3)、给校验的bean后紧跟一个BindingResult，就可以获取到校验结果
 */
@EnableRedisHttpSession
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients    //开启远程调用客户端注解
public class GulimallProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallProductApplication.class, args);
    }

}
